package com.example.demo.service.impl;

import com.example.demo.mapper.QuestionPoMapper;
import com.example.demo.po.QuestionPo;
import com.example.demo.po.QuestionPoExample;
import com.example.demo.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionServiceImpl implements QuestionService {

    @Autowired
    private QuestionPoMapper mapper;

    @Override
    public List<QuestionPo> list() {
        QuestionPoExample example = new QuestionPoExample();
        example.setDistinct(true);
        List<QuestionPo> customerPos = mapper.selectByExample(example);
        return customerPos;
    }

    @Override
    public void save(QuestionPo questionPo) {
        mapper.insert(questionPo);
    }
}
